package ctrl;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


public class LoginPageCtrl extends HttpServlet {
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		req.setCharacterEncoding("utf-8");
		resp.setCharacterEncoding("utf-8");
		String path = req.getContextPath();

		//接收参数

		String msg = req.getParameter("msg");
		if(msg==null){
			msg = "";
		}else{
			msg +="<br/>";
		}
		
		req.setAttribute("path", path);
		req.setAttribute("msg", msg);
		
		req.getRequestDispatcher("/WEB-INF/page/Login.jsp").forward(req, resp);
		
		
	}

}
